
/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

IAM API
IAM相关接口

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/

#import <Foundation/Foundation.h>

#import <JDCloudOCSDKIam/IamExecutor.h>


/// 删除子用户信息
@implementation  IamDeleteSubUserExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"DELETE";
    self.url = @"/subUser/{subUser}";
    return self;
}
@end

/// 查询用户组列表
@implementation  IamDescribeGroupsExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"GET";
    self.url = @"/groups";
    return self;
}
@end

/// 列举用户组的策略
@implementation  IamDescribeAttachedGroupPoliciesExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"GET";
    self.url = @"/group/{groupName}/policies";
    return self;
}
@end

/// 创建子用户
@implementation  IamCreateSubUserExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"POST";
    self.url = @"/subUser";
    return self;
}
@end

/// 删除策略
@implementation  IamDeletePolicyExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"DELETE";
    self.url = @"/policy/{policyName}";
    return self;
}
@end

/// 为角色绑定策略
@implementation  IamDetachRolePolicyExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"DELETE";
    self.url = @"/role/{roleName}:detachRolePolicy";
    return self;
}
@end

/// 查询子用户所属的所有组
@implementation  IamDescribeSubUserGroupsExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"GET";
    self.url = @"/subUser/{subUser}/groups";
    return self;
}
@end

/// 查询用户组详情
@implementation  IamDescribeGroupExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"GET";
    self.url = @"/group/{groupName}";
    return self;
}
@end

/// 查询子用户信息
@implementation  IamDescribeSubUserExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"GET";
    self.url = @"/subUser/{subUser}";
    return self;
}
@end

/// 修改策略描述
@implementation  IamUpdatePolicyDescriptionExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"PUT";
    self.url = @"/policy/{policyName}/description";
    return self;
}
@end

/// 启用主账号AccessKey
@implementation  IamEnabledUserAccessKeyExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"PUT";
    self.url = @"/userAccessKey/{accessKey}:enabled";
    return self;
}
@end

/// 修改用户组
@implementation  IamUpdateGroupExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"PUT";
    self.url = @"/group/{groupName}";
    return self;
}
@end

/// 为子用户解绑策略
@implementation  IamRemovePermissionOfSubUserExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"DELETE";
    self.url = @"/subUser/{subUser}/permissions/{permissionId}";
    return self;
}
@end

/// 查询子用户绑定的策略列表
@implementation  IamDescribeAttachedSubUserPoliciesExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"GET";
    self.url = @"/subUser/{subUser}/policies";
    return self;
}
@end

/// 修改策略文档
@implementation  IamUpdatePolicyExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"PUT";
    self.url = @"/policy/{policyName}";
    return self;
}
@end

/// 添加子用户到用户组中
@implementation  IamAddSubUserToGroupExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"POST";
    self.url = @"/group/{groupName}:addSubUserToGroup";
    return self;
}
@end

/// 创建用户组
@implementation  IamCreateGroupExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"POST";
    self.url = @"/group";
    return self;
}
@end

/// 为角色绑定策略
@implementation  IamAttachRolePolicyExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"POST";
    self.url = @"/role/{roleName}:attachRolePolicy";
    return self;
}
@end

/// 删除子用户的AccessKey
@implementation  IamDeleteSubUserAccessKeyExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"DELETE";
    self.url = @"/subUser/{subUser}/accessKey/{accessKey}";
    return self;
}
@end

/// 禁用主账号AccessKey
@implementation  IamDisabledUserAccessKeyExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"PUT";
    self.url = @"/userAccessKey/{accessKey}:disabled";
    return self;
}
@end

/// 创建角色
@implementation  IamCreateRoleExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"POST";
    self.url = @"/role";
    return self;
}
@end

/// 查询子用户策略列表
@implementation  IamDescribeSubUserPermissionsExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"GET";
    self.url = @"/subUser/{subUser}/permisssions";
    return self;
}
@end

/// 修改策略
@implementation  IamUpdatePermissionExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"PUT";
    self.url = @"/permission/{permissionId}";
    return self;
}
@end

/// 为子用户绑定策略
@implementation  IamAttachSubUserPolicyExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"POST";
    self.url = @"/subUser/{subUser}:attachSubUserPolicy";
    return self;
}
@end

/// 查询子用户列表
@implementation  IamDescribeSubUsersExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"GET";
    self.url = @"/subUsers";
    return self;
}
@end

/// 禁用子用户的AccessKey
@implementation  IamDisableSubUserAccessKeyExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"PUT";
    self.url = @"/subUser/{subUser}/accessKey/{accessKey}:disable";
    return self;
}
@end

/// 查询策略列表
@implementation  IamDescribePoliciesExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"GET";
    self.url = @"/policies";
    return self;
}
@end

/// 创建策略
@implementation  IamCreatePolicyExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"POST";
    self.url = @"/policy";
    return self;
}
@end

/// 查询策略列表
@implementation  IamDescribePermissionsExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"GET";
    self.url = @"/permissions";
    return self;
}
@end

/// 查询角色授权策略列表
@implementation  IamDescribeRolePoliciesExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"GET";
    self.url = @"/role/{roleName}/policies";
    return self;
}
@end

/// 删除AccessKey
@implementation  IamDeleteUserAccessKeyExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"DELETE";
    self.url = @"/userAccessKey/{accessKey}";
    return self;
}
@end

/// 为子用户解绑策略
@implementation  IamDetachSubUserPolicyExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"DELETE";
    self.url = @"/subUser/{subUser}:detachSubUserPolicy";
    return self;
}
@end

/// 查询主账号AccessKey列表
@implementation  IamDescribeUserAccessKeysExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"GET";
    self.url = @"/userAccessKeys";
    return self;
}
@end

/// 为用户组绑定策略
@implementation  IamAttachGroupPolicyExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"POST";
    self.url = @"/group/{groupName}:attachGroupPolicy";
    return self;
}
@end

/// 修改子用户信息
@implementation  IamUpdateSubUserExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"PUT";
    self.url = @"/subUser/{subUser}";
    return self;
}
@end

/// 查询用户组内的子用户列表 
@implementation  IamDescribeGroupSubUsersExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"GET";
    self.url = @"/group/{groupName}/subUsers";
    return self;
}
@end

/// 创建策略
@implementation  IamCreatePermissionExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"POST";
    self.url = @"/permission";
    return self;
}
@end

/// 为用户组解绑策略
@implementation  IamDetachGroupPolicyExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"DELETE";
    self.url = @"/group/{groupName}:detachGroupPolicy";
    return self;
}
@end

/// 查询角色详情
@implementation  IamDescribeRoleExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"GET";
    self.url = @"/role/{roleName}";
    return self;
}
@end

/// 修改角色内置policy
@implementation  IamUpdateAssumeRolePolicyExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"PUT";
    self.url = @"/role/{roleName}/assumeRolePolicy";
    return self;
}
@end

/// 查询角色列表
@implementation  IamDescribeRolesExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"GET";
    self.url = @"/roles";
    return self;
}
@end

/// 删除用户组
@implementation  IamDeleteGroupExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"DELETE";
    self.url = @"/group/{groupName}";
    return self;
}
@end

/// 查询策略详情
@implementation  IamDescribePermissionDetailExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"GET";
    self.url = @"/permission/{permissionId}";
    return self;
}
@end

/// 为子用户绑定策略
@implementation  IamAddPermissionsToSubUserExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"POST";
    self.url = @"/subUser/{subUser}/permisssions";
    return self;
}
@end

/// 查询策略详情
@implementation  IamDescribePolicyExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"GET";
    self.url = @"/policy/{policyName}";
    return self;
}
@end

/// 创建主账号AccessKey
@implementation  IamCreateUserAccessKeyExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"POST";
    self.url = @"/userAccessKey";
    return self;
}
@end

/// 将子用户从组中删除
@implementation  IamRemoveSubUserFromGroupExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"DELETE";
    self.url = @"/group/{groupName}:removeSubUserFromGroup";
    return self;
}
@end

/// 删除角色
@implementation  IamDeleteRoleExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"DELETE";
    self.url = @"/role/{roleName}";
    return self;
}
@end

/// 启用子用户AccessKey
@implementation  IamEnableSubUserAccessKeyExecutor

-(id) initWithJDCloudClient:(IamClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"PUT";
    self.url = @"/subUser/{subUser}/accessKey/{accessKey}:enable";
    return self;
}
@end
